package com.ruoyi.system.service;

import org.springframework.web.multipart.MultipartFile;

public interface IStandardFileService {

    /**
     * 文件上传接口。
     *
     * @param file 上传的文件。
     * @return the upload result, result[0] means the url, result[1] means the file path.
     * @throws Exception
     */
    public String[] uploadFile(MultipartFile file) throws Exception;

    /**
     * 文件上传接口。
     *
     * @param file 上传的文件。fileCode 适应老项目上传的fileCode
     * @return 访问地址。
     * @throws Exception
     */
    public String[] uploadFileWithFileCode(String fileCode, MultipartFile file) throws Exception;

    /**
     * remove file by file path in server.
     *
     * @param filePath the file path in server.
     * @return success or fail.
     */
    public String removeFile(String filePath);

}
